package com.reverse.engineering.util.core.run.bean.database;

import com.reverse.engineering.util.core.run.constant.Constant;
import com.reverse.engineering.util.core.run.enums.FieldEquals;

/**
 * 数据表的信息
 * 
 * @author liu
 * @date 2020-08-10
 */
public class Field {

    /**字段名*/
    private String fieldName;
    /**字段类型*/
    private String fieldType;
    /**字段长度*/
    private Integer fieldLength;
    /**字段属性*/
    private String[] fieldProperty;
    /**字段类型允许的属性*/
    private FieldEquals fieldEquals;
    /**外键表*/
    private String referencesTable;
    /**外键字段*/
    private String referencesField;
    /**外键注释*/
    private String referencesComment;
    /**字段注释*/
    private String fieldComment;
    /**操作: create:创建表的时候一起创建,insert:插入一个字段,remove:删除一个字段,update:更新一个字段*/
    private String operation = Constant.CREATE;

    /**
     * 获取字段名
     * 
     * @return
     */
    public String getFieldName() {
        return fieldName;
    }

    /**
     * 设置字段名
     * 
     * @param fieldName
     */
    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    /**
     * 获取字段类型
     * 
     * @return
     */
    public String getFieldType() {
        return fieldType;
    }

    /**
     * 设置字段类型
     * 
     * @param fieldType
     */
    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    /**
     * 获取字段长度
     * 
     * @return
     */
    public Integer getFieldLength() {
        return fieldLength;
    }

    /**
     * 设置字段长度
     * 
     * @param fieldLength
     */
    public void setFieldLength(Integer fieldLength) {
        this.fieldLength = fieldLength;
    }

    /**
     * 获取字段属性
     * 
     * @return
     */
    public String[] getFieldProperty() {
        return fieldProperty;
    }

    /**
     * 设置字段属性
     * 
     * @param fieldProperty
     */
    public void setFieldProperty(String[] fieldProperty) {
        this.fieldProperty = fieldProperty;
    }

    /**
     * 
     * 
     * @return
     */
    public FieldEquals getFieldEquals() {
        return fieldEquals;
    }

    /**
     * 
     * 
     * @param fieldProperty
     */
    public void setFieldEquals(FieldEquals fieldEquals) {
        this.fieldEquals = fieldEquals;
    }

    /**
     * 获取外键表
     * 
     * @return
     */
    public String getReferencesTable() {
        return referencesTable;
    }

    /**
     * 设置外键表
     * 
     * @param referencesTable
     */
    public void setReferencesTable(String referencesTable) {
        this.referencesTable = referencesTable;
    }

    /**
     * 获取外键字段
     * 
     * @return
     */
    public String getReferencesField() {
        return referencesField;
    }

    /**
     * 设置外键字段
     * 
     * @param referencesField
     */
    public void setReferencesField(String referencesField) {
        this.referencesField = referencesField;
    }

    /**
     * 获取外键注释
     * 
     * @return
     */
    public String getReferencesComment() {
        return referencesComment;
    }

    /**
     * 设置外键注释
     * 
     * @param referencesComment
     */
    public void setReferencesComment(String referencesComment) {
        this.referencesComment = referencesComment;
    }

    /**
     * 获取字段注释
     * 
     * @return
     */
    public String getFieldComment() {
        return fieldComment;
    }

    /**
     * 设置字段注释
     * 
     * @param fieldComment
     */
    public void setFieldComment(String fieldComment) {
        this.fieldComment = fieldComment;
    }

    /**
     * 获取操作: create:创建表的时候一起创建,insert:插入一个字段,remove:删除一个字段,update:更新一个字段
     * 
     * @return
     */
    public String getOperation() {
        return operation;
    }

    /**
     * 设置操作: create:创建表的时候一起创建,insert:插入一个字段,remove:删除一个字段,update:更新一个字段
     * 
     * @param operation
     */
    public void setOperation(String operation) {
        this.operation = operation;
    }

}